How to convert your existing indices to ElasticSearch ILM

To migrate existing indices to ILM the first thing you need to do is enabling ILM for new writes so that the existing indices are not written anymore. Then, we will have to create a new exclusive policy for the existing indices: PUT _ilm/policy/existing-indexes { "policy": { "phases": { "warm": { "min_age": "30d", "actions": { "allocate": { "require": { "data": "warm" } }, "forcemerge": { "max_num_segments": 1 } } } } } } It’s very important that the new policy does not define the action rollover. [Read More]

How to use ElasticSearch ILM and save money

This in blog I’m gonna explain how to configure the automatic rotation of indexes in ElasticSearch and how to automatically move the indices to instances that don’t need high IO so it’s cheaper. I’m gonna show you how to do that using the ElasticSearch Hot-Warm architecture. The process works by writing the data in an alias that points to the current index, when the index mets the conditions defined in the ILM policy then a new index is created and the alias is updated to point to the new index, then the previous index is eventually moved to a warm which should be cheaper. [Read More]